<template>
  <div class="head">
    <span>页面标题</span>
    <div>
      <a :href="iframeSrc" target="_blank">
        <el-button size="small"  type="primary">预览</el-button>
      </a>
      
      <el-button size="small" type="primary">内网发布</el-button>
      <el-button size="small">正式发布</el-button>
    </div>
  </div>
</template>

<script>

export default {
  name: 'pageHead',
  computed: {
    iframeSrc () {
      return `http://localhost:7001/preview/index?id=` + this.pageInfo.id
    },
    pageInfo () {
      return this.$store.state.config.data.pageInfo
    }
  },
  props: {
  
  },
  methods: {
    
  },
  data () {
    return {}
  }
}
</script>

<style lang="stylus" scoped>
  .head
    display flex
    justify-content space-between
    padding 0 20px
    height 50px
    background #f5f5f5
    display flex
    align-items center
    box-shadow 0 0 5px #ccc
    .iframe
      position fixed
      z-index 100
      position fixed
      left 0
      top 0
      width  100%
      height 100%
      iframe 
        border none 
        outline none 
        width  100%
        height 100%
</style>
